package com.martin.dms.factories.hib;

import com.martin.dms.factories.SupplierFactory;
import com.martin.dms.model.Supplier;
import com.martin.dms.model.hib.SupplierHib;

/**
 * Hibernate implementation of the Supplier factory.
 * 
 * @author mtsvetkov
 */
public class SupplierFactoryHib implements SupplierFactory {

    /**
     * {@inheritDoc}
     */
    public Supplier create(String name, String email, String address, String phoneNumber) {
        SupplierHib supplier = new SupplierHib();
        supplier.setName(name);
        supplier.setEmail(email);
        supplier.setAddress(address);
        supplier.setPhoneNumber(phoneNumber);
        return supplier;
    }

}
